import { ConanCard } from "../models/conan-card.model";
import { GlobalService } from "./global.service";

export class ConanCardService {
  static PATH = "/conan/card";
  static getAll() {
    return new Promise<ConanCard[]>(
      (resolve, reject) => {
        wx.request({
          url: `${GlobalService.HOST}${ConanCardService.PATH}`,
          method: "GET",
          success: (response) => resolve(response.data as ConanCard[]),
          fail: (err) => reject(err)
        });
      }
    )
  }
}
